Print Page | Close Window

Report Control displays blank lines....

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=15209
Printed Date: 15 November 2024 at 7:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Report Control displays blank lines....
Posted By: ddlittle
Subject: Report Control displays blank lines....
Date Posted: 18 September 2009 at 7:34pm
Not sure why.  It adds the rows, but nothing in them...
 
I tried to set the font to bold and strikethrough, but no luck.  the reportsample for C# works perfectly, and I can't see any differences that would matter.
Any ideas?
 
 
Here's the code:
 

axReportControl1.Columns.Add(1000, "First", 200, true);

axReportControl1.Columns.Add(1001, "Last", 300, true);

ReportRecord rec2;

ReportRecordItem item2;

stdole.StdFont fntStrike;

rec2 = new ReportRecord();

rec2.AddItem("Santa");

rec2.AddItem("Claus");

axReportControl1.AddRecordEx(rec2);

fntStrike = axReportControl1.PaintManager.TextFont;

fntStrike.Strikethrough = true;

fntStrike.Bold = true;

axReportControl1.Populate();

Thanks!
- David



Replies:
Posted By: jpbro
Date Posted: 18 September 2009 at 8:14pm
The ItemIndex parameter of the .Columns.Add method must be a sequential number starting from 0. Why we need to provide a sequential number starting from zero is anybodies guess, but that's just the way it is. I recommend doing something like:


axReportControl1.Columns.Add(axReportControl1.Columns.Count, "First", 200, True);
axReportControl1.Columns.Add(axReportControl1.Columns.Count, "Last", 300, True);


And it should work.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net