Sunday, March 25, 2012

Customization at runtime

I have a report which i am using in vb6.

it has following
itemid, itemname,price

but i want to give user choice to change this order at runtime,
according to him like
itemname,itemid,price or it can be any combination.

Ideas will be appreciated.
Thanks in AdvanceHi,
yes you could but not Only using CR but VB + SQL manupulating to suit u r requirement

the SQL which brings u data has to be
select Itemid as Filed1, itemname as Filed2 , price as Filed3

ie u let the user decided the orer he wants (in VB he decides through a ordering using selecting from a Left Listbox to right Listbox)

the according to that u Generate the SQL

select Itemid as Filed1, itemname as Filed2 , price as Filed3
Or
select itemname as Filed1, Itemid as Filed2 , price as Filed3
Or
......(u can simply do this depending on the use selection)

but in crystal Report use a 'Field Definitions Only' in (Database Expert --> create new connection ) then create a .ttx file with 3 field of type String with name Filed1, Filed2, Filed3 then place them in report in order

in VB set the DS value got from SQL to this report the

Note : the Order is Truely dynamic in SQL but user feels like the rpt is, but u have created only one Rpt.

Hope u got it
FaFa|||Thanks it worked.

Do you have any idea about letting user to place fields at specified position.

Thanks in Advancesql

No comments:

Post a Comment