Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control dynamically the number of columns?

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

I´m trying to do something like this with CReports8 and CReports8 OCX for Visual Basic:

Imagine I want a report like this:

Label1 Label2 label3

data1 datab1 datac1
data2 datab2 datac2
.... ..... ......
Label1, label2 and label3 are the columns name in Crystal, however I will read them from a database. So, they will work as labels despite they are true fiels from a recordset.

data1... datac1 : are fields from another recodset (a-c represents the first line of that recordset)

data2... datac3 : the same fields from the same recorset, however, they are another line of that recordset.

What I want to do is to control the number of columns. For instance, if the first recordset (that were Crystal will got the columns names) only retrives 2 fields (label 1 and label2) I would like my Report to be like this:

Label1 Label2

data data
data data

If the first recordset only retrives one field (label1) I would like my report to have only 1 column... So what I´m trying to do is to control dynamicaly the number of columns showed in my report.

Is that possible, using CReports8 OCX for Visual basic? How?

Thank you in advance :)

Sergio Oliveira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top